package top.longmarch.flow.utils;

import cn.hutool.core.map.MapUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.Map;

/**
 * @author: YuYue
 * @description: TODO
 * @date: 2022/9/6 15:14
 * @version: 1.0
 */
public class PageUtil {

    public static <T> Page<T> get(Map<String, Object> params) {
        Long pageNum = MapUtil.getLong(params, "pageNum", 1L);
        Long pageSize = MapUtil.getLong(params, "pageSize", 10L);
        return new Page<>(pageNum, pageSize);
    }

}
